<script>
init({
  title: 'AJAX Options',
  desc: 'Use `ajaxOptions` option to set the Additional options for submit ajax reques, for example we can use `beforeSend` option to send the custom request header.',
  links: ['bootstrap-table.min.css'],
  scripts: ['bootstrap-table.min.js']
})
</script>

<template>
  <table
    id="table"
    data-toggle="table"
    data-height="460"
    data-ajax-options="ajaxOptions"
    data-url="json/data1.json"
  >
    <thead>
      <tr>
        <th data-field="id">
          ID
        </th>
        <th data-field="name">
          Item Name
        </th>
        <th data-field="price">
          Item Price
        </th>
      </tr>
    </thead>
  </table>
</template>

<script>
  window.ajaxOptions = {
    beforeSend (xhr) {
      xhr.setRequestHeader('custom-auth-token', 'custom-auth-token')
    }
  }
</script>
